﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace PSE.Framework.Process
{
    [DataContract]
    public class ParentProcessStartInfo : HierarchicalProcessStartInfo
    {
        public ParentProcessStartInfo()
            : base()
        {
            this.ProcessId = -1;
        }

        public ParentProcessStartInfo(string[] args)
            : this()
        {
            this.ProcessId = Convert.ToInt32(args[1]);
            this.Name = args[2];
            this.FileName = args[3];
            this.Domain = args[4];
            this.UserName = args[5];
            this.CheckParentIsAlive = Convert.ToBoolean(args[6]);
            this.CheckChildIsAlive = Convert.ToBoolean(args[7]);
        }

        [DataMember]
        public int ProcessId { get; set; }
    }
}
